"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Window = function () {
};
Window.prototype.hello = function () {
    console.log('hello---4');
};
var createInstance = (function () {
    var instance;
    return function () {
        if (!instance) {
            console.log('4   没有走缓存');
            return instance = new Window;
        }
        ;
        console.log('4  走缓存');
        return instance;
    };
})();
//4 测试单例
var w1 = createInstance();
var w2 = createInstance();
console.log("4 \u4E24\u4E2A\u5B9E\u4F8B\u662F\u5426\u4E00\u6837" + (w1 == w2));
